<?php $ui = $this->load->library('Ui'); ?>
    <h2>List of Users</h2>
	<?php
		$header = 	$ui->makeOption('<a href="#" rel="#overlay">Get Help With This Page</a>' . ' '.
					anchor('user/admin', 'Manage Users') . ' '.
					anchor('user/admin/add', 'Add a User'). ' ', 1 ).
					'<div class="clear"></div>';
		$content = '<table cellspacing="1" cellpadding="5" width="100%">
		<tr class="head"><th>Display Name</th><th>Email</th><th>Group</th><th width="13%">Actions</th></tr>';

		foreach($user as $var => $value)
		{
			$edit = base_url()."static/_css/images/icons/pencil.png";
			$delete = base_url()."static/_css/images/icons/delete.png";
			$activate = base_url()."static/_css/images/icons/accept.png";
			$username = $value['username'];
				$content .= "<tr>
						<td>".$value['display_name']."</td>
						<td>".$value['email']."</td>
						<td>".$group[$username]['title']."</td>
						<td>"
							.anchor('user/admin/edit/'.$value['id'], "<img src='$edit' />")
							.anchor('user/admin/delete/'.$value['id'], "<img src='$delete' />");
					
				$content .= "</td></tr>\n";
		}
		$content .= "</table>";
		
		echo $ui->makeDialog('List of Users'.$header, $content, 'maximize center');
	?>
<div class="overlay" id="overlay">
	<!-- here is the content for overlay, can be anything -->
	<h2 style="margin:10px 0">Help! <em>Managing Users.</em></h2>
	<p>
			<strong>Manage Users</strong><br />
			<span class="help">This allows you to add, delete, and edit the options of users on your website.</span><br /><br />
			<strong>Add User</strong><br />
			<span class="help">This allows you to add a user, set the password and level of access.</span><br /><br />
			<strong>Edit User</strong><br />
			<span class="help">This allows you to Edit a user's username, password, level of access, and activation status.</span><br /><br />
			<strong>Delete User</strong><br />
			<span class="help">This allows you to Delete a user.</span><br /><br />
			
	</p>
</div>
